using System;
using System.ComponentModel;
using System.Drawing;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ICP_MS.Plugin.Tune;

public class FormRf_Ncs : Form
{
	private bool isDispose = false;

	private ToolTip ttpSettings = new ToolTip();

	private IContainer components = null;

	private Button btnSetNcs;

	private TurnCntl tcfStable;

	private TurnCntl tcfDwell;

	private TurnCntl tcfSuspend;

	private TurnCntlFeed tcfHexRf;

	private TurnCntlFeed tcfEM;

	private TurnCntlFeed tcfShield;

	private FlowLayoutPanel flowLayoutPanel1;

	private TurnCntlFeed tcfHVP;

	private TurnCntlFeed tcfHVN;

	private TurnCntlFeed tcfGate;

	public FormRf_Ncs()
	{
		InitializeComponent();
		ttpSettings.InitialDelay = 200;
		ttpSettings.AutoPopDelay = 10000;
		ttpSettings.ReshowDelay = 200;
		ttpSettings.ShowAlways = true;
		ttpSettings.IsBalloon = true;
	}

	private void InitConfigs()
	{
		double quadVacuum = Vacuum.vacumm.ReadVacuum[2];
		int status1 = Vacuum.vacumm.ReadVacuumStatus[2];
		try
		{
			tcfSuspend.Value = Convert.ToDecimal(RFManager.rfs.suspend);
			tcfStable.Value = Convert.ToDecimal(RFManager.rfs.stable);
			tcfDwell.Value = Convert.ToDecimal(RFManager.rfs.dwell);
			if (UserManager.CurrentUser.authority <= 1)
			{
				if (!Vacuum.Instance.QuadVacuumOK)
				{
					if (MessageBox.Show("四极杆真空未达到，设置倍增器电压将损害该部件，请确实是否继续操作！", Lang.Txt("AddFormIgnite.Warn"), MessageBoxButtons.OKCancel) == DialogResult.OK)
					{
						tcfEM.Value = Convert.ToDecimal(LensManager.x2lens.Etp);
						tcfHVP.Value = Convert.ToDecimal(RFManager.rfs.HVP);
						tcfHVN.Value = Convert.ToDecimal(RFManager.rfs.HVN);
						tcfGate.Value = Convert.ToDecimal(RFManager.rfs.Gate);
					}
				}
				else
				{
					tcfEM.Value = Convert.ToDecimal(LensManager.x2lens.Etp);
					tcfHVP.Value = Convert.ToDecimal(RFManager.rfs.HVP);
					tcfHVN.Value = Convert.ToDecimal(RFManager.rfs.HVN);
					tcfGate.Value = Convert.ToDecimal(RFManager.rfs.Gate);
				}
			}
			else
			{
				tcfEM.Value = Convert.ToDecimal(LensManager.x2lens.Etp);
				tcfHVP.Value = Convert.ToDecimal(RFManager.rfs.HVP);
				tcfHVN.Value = Convert.ToDecimal(RFManager.rfs.HVN);
				tcfGate.Value = Convert.ToDecimal(RFManager.rfs.Gate);
			}
			tcfHexRf.Value = Convert.ToDecimal(RFManager.rfs.hexPara);
			tcfShield.Value = 1m;
		}
		catch
		{
			Log.InsertLog("RF", "Params exceed limit", "", (Severity)3);
		}
	}

	private void TermConfigs()
	{
		RemoveConfigsMsg();
	}

	private void AddConfigsMsg()
	{
		tcfSuspend.ValueChanged += RF_ValueChanged;
		tcfDwell.ValueChanged += RF_ValueChanged;
		tcfStable.ValueChanged += RF_ValueChanged;
		tcfEM.ValueChanged += RF_ValueChanged;
		tcfHexRf.ValueChanged += RF_ValueChanged;
		tcfShield.ValueChanged += RF_ValueChanged;
		tcfHVP.ValueChanged += RF_ValueChanged;
		tcfHVN.ValueChanged += RF_ValueChanged;
		tcfGate.ValueChanged += RF_ValueChanged;
	}

	private void RemoveConfigsMsg()
	{
		tcfSuspend.ValueChanged -= RF_ValueChanged;
		tcfDwell.ValueChanged -= RF_ValueChanged;
		tcfStable.ValueChanged -= RF_ValueChanged;
		tcfEM.ValueChanged -= RF_ValueChanged;
		tcfHexRf.ValueChanged -= RF_ValueChanged;
		tcfShield.ValueChanged -= RF_ValueChanged;
		tcfHVP.ValueChanged -= RF_ValueChanged;
		tcfHVN.ValueChanged -= RF_ValueChanged;
		tcfGate.ValueChanged -= RF_ValueChanged;
	}

	private void RF_ValueChanged(object sender, EventArgs e)
	{
		string name = (sender as UserControl).Name;
		double quadVacuum = Vacuum.vacumm.ReadVacuum[2];
		int status1 = Vacuum.vacumm.ReadVacuumStatus[2];
		if (name == tcfSuspend.Name)
		{
			RFManager.rfs.suspend = decimal.ToDouble(tcfSuspend.Value);
			Detector.Instance.msDetectorRF.SetSuspend(false);
		}
		else if (name == tcfDwell.Name)
		{
			RFManager.rfs.dwell = decimal.ToDouble(tcfDwell.Value);
			Detector.Instance.msDetectorRF.SetDwell();
		}
		else if (name == tcfStable.Name)
		{
			RFManager.rfs.stable = decimal.ToDouble(tcfStable.Value);
			Detector.Instance.msDetectorRF.SetStable();
		}
		else if (name == tcfEM.Name)
		{
			if (tcfEM.Value < tcfEM.MinValue || tcfEM.Value > tcfEM.MaxValue)
			{
				tcfEM.Value = Convert.ToDecimal(LensManager.x2lens.ReadEtp);
				return;
			}
			LensManager.x2lens.Etp = decimal.ToDouble(tcfEM.Value);
			LensManager.Instance.SetEtp();
			Detector.Instance.msDetectorRF.SendVersion();
		}
		else if (name == tcfHVP.Name)
		{
			if (UserManager.CurrentUser.authority <= 1 && !Vacuum.Instance.QuadVacuumOK && MessageBox.Show(Lang.Txt("FormInstrumentTune.MessageBox.quadrupoleVacuumNoReached.Text"), Lang.Txt("AddFormIgnite.Warn"), MessageBoxButtons.OKCancel) == DialogResult.Cancel)
			{
				return;
			}
			if (tcfHVP.Value < tcfHVP.MinValue || tcfHVP.Value > tcfHVP.MaxValue)
			{
				tcfHVP.Value = Convert.ToDecimal(RFManager.rfs.ReadHVP);
				return;
			}
			RFManager.rfs.HVP = decimal.ToUInt32(tcfHVP.Value);
			tcfGate.Value = (decimal)((double)RFManager.rfs.HVP * 0.23);
			RFManager.rfs.Gate = (int)decimal.ToUInt16(tcfGate.Value);
			if (Detector.detectorConfig.IsNewDetector)
			{
				Detector.Instance.msDetectorRF.SetHVPNew();
				Thread.Sleep(1);
				Detector.Instance.msDetectorRF.SetGateNew();
			}
			else
			{
				Detector.Instance.msDetectorRF.SetHVP();
				Thread.Sleep(1);
				Detector.Instance.msDetectorRF.SetGate();
			}
		}
		else if (name == tcfHVN.Name)
		{
			if (UserManager.CurrentUser.authority <= 1 && !Vacuum.Instance.QuadVacuumOK && MessageBox.Show("四极杆真空未达到，设置倍增器电压将损害该部件，请确实是否继续操作！", Lang.Txt("AddFormIgnite.Warn"), MessageBoxButtons.OKCancel) == DialogResult.Cancel)
			{
				return;
			}
			if (tcfHVN.Value < tcfHVN.MinValue || tcfHVN.Value > tcfHVN.MaxValue)
			{
				tcfHVN.Value = Convert.ToDecimal(RFManager.rfs.ReadHVN);
			}
			else
			{
				RFManager.rfs.HVN = decimal.ToInt32(tcfHVN.Value);
				if (Detector.detectorConfig.IsNewDetector)
				{
					Detector.Instance.msDetectorRF.SetHVNNew();
				}
				else
				{
					Detector.Instance.msDetectorRF.SetHVN();
				}
			}
			Detector.Instance.msDetectorRF.SendVersion();
		}
		else if (name == tcfGate.Name)
		{
			RFManager.rfs.Gate = (int)decimal.ToUInt16(tcfGate.Value);
			if (Detector.detectorConfig.IsNewDetector)
			{
				Detector.Instance.msDetectorRF.SetGateNew();
			}
			else
			{
				Detector.Instance.msDetectorRF.SetGate();
			}
		}
		else if (name == tcfHexRf.Name)
		{
			RFManager.rfs.hexPara = decimal.ToSingle(tcfHexRf.Value);
		}
		else if (name == tcfShield.Name)
		{
			if (tcfShield.Value == 1m)
			{
				Plasma.Instance.OpenShield();
			}
			else
			{
				Plasma.Instance.CloseShield();
			}
		}
	}

	private void UpdateNcsRFs()
	{
		RFManager.rfs.hexPara = decimal.ToSingle(tcfHexRf.Value);
		RFManager.rfs.suspend = decimal.ToSingle(tcfSuspend.Value);
		RFManager.rfs.dwell = decimal.ToDouble(tcfDwell.Value);
		RFManager.rfs.stable = decimal.ToDouble(tcfStable.Value);
	}

	private void btnSetNcs_Click(object sender, EventArgs e)
	{
		UpdateNcsRFs();
		if (Detector.detectorConfig.IsNewDetector)
		{
			Detector.Instance.msDetectorRF.SetQuadPoleNew();
			Detector.Instance.msDetectorRF.SetPrePoleNew();
		}
		else
		{
			Detector.Instance.msDetectorRF.SetQuadPole();
			Detector.Instance.msDetectorRF.SetPrePole();
		}
		Detector.Instance.msDetectorRF.SetSuspend(false);
		Detector.Instance.msDetectorRF.SetDwell();
		Detector.Instance.msDetectorRF.SetStable();
	}

	private void FormRf_Ncs_Load(object sender, EventArgs e)
	{
		if (Detector.detectorConfig.IsNewBoard)
		{
			tcfEM.Visible = false;
		}
		else
		{
			tcfHVP.Visible = false;
			tcfHVN.Visible = false;
			tcfGate.Visible = false;
		}
		tcfHVN.MinValue = -Convert.ToDecimal(Detector.detectorConfig.RangeHVN);
		tcfHexRf.TipMax = 6.5;
		tcfHexRf.TipMin = 1.0;
		tcfShield.MouseEnter += Tcf_MouseEnter;
		tcfShield.Value = 1m;
		InitConfigs();
		AddConfigsMsg();
		Task.Factory.StartNew(delegate
		{
			while (!isDispose)
			{
				try
				{
					Invoke((MethodInvoker)delegate
					{
						tcfEM.FeedBack = LensManager.x2lens.ReadEtp;
						tcfHexRf.FeedBack = LensManager.x2lens.ReadHex;
						tcfShield.FeedBack = PlasmaManager.plasma.StatusShield;
						tcfHVP.FeedBack = RFManager.rfs.ReadHVP;
						tcfHVN.FeedBack = RFManager.rfs.ReadHVN;
						tcfGate.FeedBack = RFManager.rfs.ReadGate;
					});
				}
				catch
				{
				}
				Thread.Sleep(2000);
			}
		});
		ApplyResources();
		UserManager.UserChanged += UserManager_UserChanged;
	}

	private void Tcf_MouseEnter(object sender, EventArgs e)
	{
		Control ctrl = (Control)sender;
		string tipOverwrite = " ";
		switch (ctrl.Name)
		{
		case "tcfHexRf":
			tipOverwrite = "建议六极杆系数：1~6.5";
			break;
		case "tcfprePole":
			tipOverwrite = "建议预杆偏置：-2~0";
			break;
		case "tcfQuadPole":
			tipOverwrite = "建议四极杆偏置：-0.5";
			break;
		case "tcfShield":
			tipOverwrite = "0断1通";
			break;
		}
		ttpSettings.SetToolTip(ctrl, tipOverwrite);
	}

	private void ApplyResources()
	{
		Text = Lang.Txt("FormRF.Title.Text");
		tcfDwell.Label = Lang.Txt("FormRF.DwellTime.Text");
		tcfEM.Label = Lang.Txt("FormRF.MultiplierVoltage.Text");
		tcfHexRf.Label = Lang.Txt("FormRF.SixPoleCoefficient.Text");
		tcfStable.Label = Lang.Txt("FormRF.StableTime.Text");
		tcfSuspend.Label = Lang.Txt("FormRF.Suspend.Text");
		btnSetNcs.Text = Lang.Txt("FormRF.NCSSet.Text");
		tcfShield.Label = Lang.Txt("ADDTune.FormRf.ShieldGround");
	}

	private void FormRf_Ncs_FormClosing(object sender, FormClosingEventArgs e)
	{
		isDispose = true;
		TermConfigs();
		UserManager.UserChanged -= UserManager_UserChanged;
	}

	private void UserManager_UserChanged(object sender, EventArgs e)
	{
	}

	public void ConfigsChanged(object sender, EventArgs e)
	{
		RemoveConfigsMsg();
		InitConfigs();
		AddConfigsMsg();
	}

	private void tcfEM_ValueChanged(object sender, EventArgs e)
	{
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.btnSetNcs = new System.Windows.Forms.Button();
		this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
		this.tcfSuspend = new ICP_MS.Plugin.Tune.TurnCntl();
		this.tcfStable = new ICP_MS.Plugin.Tune.TurnCntl();
		this.tcfDwell = new ICP_MS.Plugin.Tune.TurnCntl();
		this.tcfEM = new ICP_MS.Plugin.Tune.TurnCntlFeed();
		this.tcfHVP = new ICP_MS.Plugin.Tune.TurnCntlFeed();
		this.tcfHVN = new ICP_MS.Plugin.Tune.TurnCntlFeed();
		this.tcfGate = new ICP_MS.Plugin.Tune.TurnCntlFeed();
		this.tcfHexRf = new ICP_MS.Plugin.Tune.TurnCntlFeed();
		this.tcfShield = new ICP_MS.Plugin.Tune.TurnCntlFeed();
		this.flowLayoutPanel1.SuspendLayout();
		base.SuspendLayout();
		this.btnSetNcs.Location = new System.Drawing.Point(5, 707);
		this.btnSetNcs.Margin = new System.Windows.Forms.Padding(5);
		this.btnSetNcs.Name = "btnSetNcs";
		this.btnSetNcs.Size = new System.Drawing.Size(314, 30);
		this.btnSetNcs.TabIndex = 48;
		this.btnSetNcs.Text = "设置NCS";
		this.btnSetNcs.UseVisualStyleBackColor = true;
		this.btnSetNcs.Click += new System.EventHandler(btnSetNcs_Click);
		this.flowLayoutPanel1.AutoScroll = true;
		this.flowLayoutPanel1.Controls.Add(this.tcfSuspend);
		this.flowLayoutPanel1.Controls.Add(this.tcfStable);
		this.flowLayoutPanel1.Controls.Add(this.tcfDwell);
		this.flowLayoutPanel1.Controls.Add(this.tcfEM);
		this.flowLayoutPanel1.Controls.Add(this.tcfHVP);
		this.flowLayoutPanel1.Controls.Add(this.tcfHVN);
		this.flowLayoutPanel1.Controls.Add(this.tcfGate);
		this.flowLayoutPanel1.Controls.Add(this.tcfHexRf);
		this.flowLayoutPanel1.Controls.Add(this.tcfShield);
		this.flowLayoutPanel1.Controls.Add(this.btnSetNcs);
		this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
		this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
		this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
		this.flowLayoutPanel1.Name = "flowLayoutPanel1";
		this.flowLayoutPanel1.Size = new System.Drawing.Size(329, 810);
		this.flowLayoutPanel1.TabIndex = 53;
		this.tcfSuspend.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfSuspend.C = 0.0;
		this.tcfSuspend.CodeId = 6u;
		this.tcfSuspend.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfSuspend.DecimalPlaces = 2;
		this.tcfSuspend.Defalut = 0.0;
		this.tcfSuspend.DestId = 16u;
		this.tcfSuspend.FeedDecimal = 1;
		this.tcfSuspend.Increment = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfSuspend.K = 0.0;
		this.tcfSuspend.Label = "悬挂值(RF)";
		this.tcfSuspend.Location = new System.Drawing.Point(7, 6);
		this.tcfSuspend.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfSuspend.MaxValue = new decimal(new int[4] { 250, 0, 0, 0 });
		this.tcfSuspend.MinValue = new decimal(new int[4]);
		this.tcfSuspend.Name = "tcfSuspend";
		this.tcfSuspend.Size = new System.Drawing.Size(312, 66);
		this.tcfSuspend.TabIndex = 45;
		this.tcfSuspend.TipMax = double.NaN;
		this.tcfSuspend.TipMin = double.NaN;
		this.tcfSuspend.Value = new decimal(new int[4]);
		this.tcfStable.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfStable.C = 0.0;
		this.tcfStable.CodeId = 8u;
		this.tcfStable.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfStable.DecimalPlaces = 2;
		this.tcfStable.Defalut = 0.0;
		this.tcfStable.DestId = 16u;
		this.tcfStable.FeedDecimal = 1;
		this.tcfStable.Increment = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfStable.K = 0.0;
		this.tcfStable.Label = "稳定时间(ms)";
		this.tcfStable.Location = new System.Drawing.Point(7, 84);
		this.tcfStable.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfStable.MaxValue = new decimal(new int[4] { 100, 0, 0, 0 });
		this.tcfStable.MinValue = new decimal(new int[4]);
		this.tcfStable.Name = "tcfStable";
		this.tcfStable.Size = new System.Drawing.Size(312, 66);
		this.tcfStable.TabIndex = 47;
		this.tcfStable.TipMax = double.NaN;
		this.tcfStable.TipMin = double.NaN;
		this.tcfStable.Value = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfDwell.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfDwell.C = 0.0;
		this.tcfDwell.CodeId = 7u;
		this.tcfDwell.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfDwell.DecimalPlaces = 1;
		this.tcfDwell.Defalut = 0.0;
		this.tcfDwell.DestId = 16u;
		this.tcfDwell.FeedDecimal = 1;
		this.tcfDwell.Increment = new decimal(new int[4] { 5, 0, 0, 0 });
		this.tcfDwell.K = 0.0;
		this.tcfDwell.Label = "驻留时间(ms)";
		this.tcfDwell.Location = new System.Drawing.Point(7, 162);
		this.tcfDwell.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfDwell.MaxValue = new decimal(new int[4] { 2000, 0, 0, 0 });
		this.tcfDwell.MinValue = new decimal(new int[4]);
		this.tcfDwell.Name = "tcfDwell";
		this.tcfDwell.Size = new System.Drawing.Size(312, 66);
		this.tcfDwell.TabIndex = 46;
		this.tcfDwell.TipMax = double.NaN;
		this.tcfDwell.TipMin = double.NaN;
		this.tcfDwell.Value = new decimal(new int[4] { 10, 0, 0, 0 });
		this.tcfEM.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfEM.C = 0.0;
		this.tcfEM.CodeId = 0u;
		this.tcfEM.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfEM.DecimalPlaces = 0;
		this.tcfEM.Defalut = 0.0;
		this.tcfEM.DestId = 0u;
		this.tcfEM.FeedDecimal = 2;
		this.tcfEM.Increment = new decimal(new int[4] { 5, 0, 0, 0 });
		this.tcfEM.K = 0.0;
		this.tcfEM.Label = "倍增器电压";
		this.tcfEM.Location = new System.Drawing.Point(7, 240);
		this.tcfEM.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfEM.MaxValue = new decimal(new int[4]);
		this.tcfEM.MinValue = new decimal(new int[4] { 3500, 0, 0, -2147483648 });
		this.tcfEM.Name = "tcfEM";
		this.tcfEM.Size = new System.Drawing.Size(312, 66);
		this.tcfEM.TabIndex = 51;
		this.tcfEM.TipMax = double.NaN;
		this.tcfEM.TipMin = double.NaN;
		this.tcfEM.Value = new decimal(new int[4]);
		this.tcfEM.ValueChanged += new System.EventHandler(tcfEM_ValueChanged);
		this.tcfHVP.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfHVP.C = 0.0;
		this.tcfHVP.CodeId = 0u;
		this.tcfHVP.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfHVP.DecimalPlaces = 0;
		this.tcfHVP.Defalut = 0.0;
		this.tcfHVP.DestId = 0u;
		this.tcfHVP.FeedDecimal = 2;
		this.tcfHVP.Increment = new decimal(new int[4] { 5, 0, 0, 0 });
		this.tcfHVP.K = 0.0;
		this.tcfHVP.Label = "HVP";
		this.tcfHVP.Location = new System.Drawing.Point(7, 318);
		this.tcfHVP.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfHVP.MaxValue = new decimal(new int[4] { 2500, 0, 0, 0 });
		this.tcfHVP.MinValue = new decimal(new int[4]);
		this.tcfHVP.Name = "tcfHVP";
		this.tcfHVP.Size = new System.Drawing.Size(312, 66);
		this.tcfHVP.TabIndex = 53;
		this.tcfHVP.TipMax = double.NaN;
		this.tcfHVP.TipMin = double.NaN;
		this.tcfHVP.Value = new decimal(new int[4]);
		this.tcfHVN.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfHVN.C = 0.0;
		this.tcfHVN.CodeId = 0u;
		this.tcfHVN.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfHVN.DecimalPlaces = 0;
		this.tcfHVN.Defalut = 0.0;
		this.tcfHVN.DestId = 0u;
		this.tcfHVN.FeedDecimal = 2;
		this.tcfHVN.Increment = new decimal(new int[4] { 5, 0, 0, 0 });
		this.tcfHVN.K = 0.0;
		this.tcfHVN.Label = "HVN";
		this.tcfHVN.Location = new System.Drawing.Point(7, 396);
		this.tcfHVN.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfHVN.MaxValue = new decimal(new int[4]);
		this.tcfHVN.MinValue = new decimal(new int[4] { 3000, 0, 0, -2147483648 });
		this.tcfHVN.Name = "tcfHVN";
		this.tcfHVN.Size = new System.Drawing.Size(312, 66);
		this.tcfHVN.TabIndex = 54;
		this.tcfHVN.TipMax = double.NaN;
		this.tcfHVN.TipMin = double.NaN;
		this.tcfHVN.Value = new decimal(new int[4]);
		this.tcfGate.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfGate.C = 0.0;
		this.tcfGate.CodeId = 0u;
		this.tcfGate.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfGate.DecimalPlaces = 0;
		this.tcfGate.Defalut = 0.0;
		this.tcfGate.DestId = 0u;
		this.tcfGate.FeedDecimal = 2;
		this.tcfGate.Increment = new decimal(new int[4] { 5, 0, 0, 0 });
		this.tcfGate.K = 0.0;
		this.tcfGate.Label = "Gate";
		this.tcfGate.Location = new System.Drawing.Point(7, 474);
		this.tcfGate.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfGate.MaxValue = new decimal(new int[4] { 600, 0, 0, 0 });
		this.tcfGate.MinValue = new decimal(new int[4]);
		this.tcfGate.Name = "tcfGate";
		this.tcfGate.Size = new System.Drawing.Size(312, 66);
		this.tcfGate.TabIndex = 55;
		this.tcfGate.TipMax = double.NaN;
		this.tcfGate.TipMin = double.NaN;
		this.tcfGate.Value = new decimal(new int[4]);
		this.tcfHexRf.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfHexRf.C = 0.0;
		this.tcfHexRf.CodeId = 0u;
		this.tcfHexRf.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfHexRf.DecimalPlaces = 3;
		this.tcfHexRf.Defalut = 0.0;
		this.tcfHexRf.DestId = 0u;
		this.tcfHexRf.FeedDecimal = 1;
		this.tcfHexRf.Increment = new decimal(new int[4] { 1, 0, 0, 131072 });
		this.tcfHexRf.K = 0.0;
		this.tcfHexRf.Label = "六极杆系数";
		this.tcfHexRf.Location = new System.Drawing.Point(7, 552);
		this.tcfHexRf.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfHexRf.MaxValue = new decimal(new int[4] { 20, 0, 0, 0 });
		this.tcfHexRf.MinValue = new decimal(new int[4]);
		this.tcfHexRf.Name = "tcfHexRf";
		this.tcfHexRf.Size = new System.Drawing.Size(312, 66);
		this.tcfHexRf.TabIndex = 50;
		this.tcfHexRf.TipMax = double.NaN;
		this.tcfHexRf.TipMin = double.NaN;
		this.tcfHexRf.Value = new decimal(new int[4] { 6, 0, 0, 0 });
		this.tcfShield.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
		this.tcfShield.C = 0.0;
		this.tcfShield.CodeId = 0u;
		this.tcfShield.Coe = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfShield.DecimalPlaces = 0;
		this.tcfShield.Defalut = 0.0;
		this.tcfShield.DestId = 0u;
		this.tcfShield.FeedDecimal = 1;
		this.tcfShield.Increment = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfShield.K = 0.0;
		this.tcfShield.Label = "屏蔽接地";
		this.tcfShield.Location = new System.Drawing.Point(7, 630);
		this.tcfShield.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
		this.tcfShield.MaxValue = new decimal(new int[4] { 1, 0, 0, 0 });
		this.tcfShield.MinValue = new decimal(new int[4]);
		this.tcfShield.Name = "tcfShield";
		this.tcfShield.Size = new System.Drawing.Size(312, 66);
		this.tcfShield.TabIndex = 52;
		this.tcfShield.TipMax = double.NaN;
		this.tcfShield.TipMin = double.NaN;
		this.tcfShield.Value = new decimal(new int[4]);
		base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 15f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(329, 810);
		base.Controls.Add(this.flowLayoutPanel1);
		base.Margin = new System.Windows.Forms.Padding(5);
		base.Name = "FormRf_Ncs";
		base.ShowIcon = false;
		this.Text = "射频电源";
		base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(FormRf_Ncs_FormClosing);
		base.Load += new System.EventHandler(FormRf_Ncs_Load);
		this.flowLayoutPanel1.ResumeLayout(false);
		base.ResumeLayout(false);
	}
}
